Skip to content

Leverage LSP to do compile instead of CLI #7239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
May 15, 2025
Merged

Leverage LSP to do compile instead of CLI #7239

merged 37 commits into from
May 15, 2025

Conversation

chunyu3
Copy link
Contributor

@chunyu3 chunyu3 commented May 6, 2025

Fix #6663

Now we are having many problems when triggering the compile from CLI and handling its output in our Output window like multiple loglevel, how to handle ```stderr``, coloring and so on.

So to resolve all these problems, let's trigger compile through LSP instead of CLI so that we can retrieve the result of compile directly which is more reliable and also easier to do post-processing.

Copy link
Contributor

github-actions bot commented May 6, 2025

All changed packages have been documented.

  • @typespec/compiler
  • typespec-vscode
Show changes

typespec-vscode - feature ✏️

Use language server to compile project instead of CLI

@typespec/compiler - feature ✏️

[LSP] Expose new compile project command

@azure-sdk
Copy link
Collaborator

azure-sdk commented May 6, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@chunyu3
Copy link
Contributor Author

chunyu3 commented May 6, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@chunyu3 chunyu3 requested a review from RodgeFu May 15, 2025 00:17
@RodgeFu RodgeFu added the ide Issues for VS, VSCode, Monaco, etc. label May 15, 2025
@chunyu3 chunyu3 requested a review from lirenhe May 15, 2025 05:39
@chunyu3 chunyu3 added this pull request to the merge queue May 15, 2025
Merged via the queue into microsoft:main with commit 14b551e May 15, 2025
24 checks passed
@chunyu3 chunyu3 deleted the lsp branch May 15, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leverage LSP to do compile instead of CLI
5 participants